﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Brunch
{
	public static class Common
	{
		private static void ShowMessage(string message, MessageBoxIcon icon)
		{
			MessageBox.Show(message, Constants.ProductName, MessageBoxButtons.OK, icon);
		}

		public static void ShowError(string message)
		{
			ShowMessage(message, MessageBoxIcon.Error);
		}

		public static void ShowWarning(string message)
		{
			ShowMessage(message, MessageBoxIcon.Warning);
		}

		public static void ShowInformation(string message)
		{
			ShowMessage(message, MessageBoxIcon.Information);
		}

		public static DialogResult GetUserInput(string message, MessageBoxButtons buttons)
		{
			return MessageBox.Show(message, Constants.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
		}

		public static void ConfigureBrowseFolderDialog(FolderBrowserDialog fbd)
		{
			fbd.Description = "Select a project's root folder";
			fbd.ShowNewFolderButton = false;
		}
	}
}
